package com.yanqu.road.entity.activity.gourdchild;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.FieldTypeAnnotation;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@FieldTypeAnnotation(tableName = "t_u_activity_gourd_child_user_data")
public class GourdChildUserData extends DataObject {

    @FieldTypeAnnotation(desc = "活动ID", select = true, update = true)
    private int activityId;

    @FieldTypeAnnotation(desc = "用户ID", select = true, update = true)
    private long userId;

    @FieldTypeAnnotation(desc = "积分")
    private long score;

    @FieldTypeAnnotation(desc = "体力")
    private int energy;

    @FieldTypeAnnotation(desc = "上次恢复时间")
    private long lastRecTime;

    @FieldTypeAnnotation(desc = "当前关卡-最高进度-已过关-有星级")
    private int passId;

    @FieldTypeAnnotation(desc = "游戏数据")
    private List<Grid> gridList = new ArrayList<>();

    @FieldTypeAnnotation(desc = "下一个格子数据")
    private Grid nextGrid = new Grid();

    @FieldTypeAnnotation(desc = "所有关卡完成最高星级")
    private Map<Integer, Integer> passStar = new HashMap<>();

    @FieldTypeAnnotation(desc = "彩莲等级")
    private int lotusLv;

    @FieldTypeAnnotation(desc = "练习的单步（一次移动）最高伤害")
    private long trainDamage;

    @FieldTypeAnnotation(desc = "单步（一次移动）最高伤害")
    private long normalDamage;

    @FieldTypeAnnotation(desc = "关卡进度")
    private GourdChildPassDetail passDetail = new GourdChildPassDetail();

    //盲合抽奖
    @FieldTypeAnnotation(desc = "总抽盲盒次数")
    private int totalTimes;
    @FieldTypeAnnotation(desc = "盲盒奖励")
    private List<Integer> drawBoxList = new ArrayList<>();
    @FieldTypeAnnotation(desc = "前六是否有大奖")
    private boolean getSharedBox;

    @FieldTypeAnnotation(desc = "距上次抽中隐藏款的次数")
    private int commonTimes;

    @FieldTypeAnnotation(desc = "历史最高关卡-默认0")
    private int historyPassId;

    //缓存
    //练习模式
    private List<Grid> tempGridList = new ArrayList<>();
    private Grid tempNextGrid = new Grid();
    private GourdChildPassDetail tempPassDetail = new GourdChildPassDetail();

    // 上次抽低价隐藏盲盒时间
    private long lastDrawHideTime;

    public int getActivityId() {
        return activityId;
    }

    public void setActivityId(int activityId) {
        if(this.activityId != activityId) {
            this.activityId = activityId;
            setUpdateOption();
        }
    }

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        if(this.userId != userId) {
            this.userId = userId;
            setUpdateOption();
        }
    }

    public long getScore() {
        return score;
    }

    public void setScore(long score) {
        if(this.score != score) {
            this.score = score;
            setUpdateOption();
        }
    }

    public int getEnergy() {
        return energy;
    }

    public void setEnergy(int energy) {
        if(this.energy != energy) {
            this.energy = energy;
            setUpdateOption();
        }
    }

    public long getLastRecTime() {
        return lastRecTime;
    }

    public void setLastRecTime(long lastRecTime) {
        if(this.lastRecTime != lastRecTime) {
            this.lastRecTime = lastRecTime;
            setUpdateOption();
        }
    }

    public int getPassId() {
        return passId;
    }

    public void setPassId(int passId) {
        if(this.passId != passId) {
            this.passId = passId;
            setUpdateOption();
        }
    }

    public List<Grid> getGridList() {
        return gridList;
    }

    public void setGridList(List<Grid> gridList) {
        this.gridList = gridList;
        setUpdateOption();
    }

    public Map<Integer, Integer> getPassStar() {
        return passStar;
    }

    public void setPassStar(Map<Integer, Integer> passStar) {
        this.passStar = passStar;
        setUpdateOption();
    }

    public int getLotusLv() {
        return lotusLv;
    }

    public void setLotusLv(int lotusLv) {
        if(this.lotusLv != lotusLv) {
            this.lotusLv = lotusLv;
            setUpdateOption();
        }
    }

    public Grid getNextGrid() {
        return nextGrid;
    }

    public void setNextGrid(Grid nextGrid) {
        this.nextGrid = nextGrid;
        setUpdateOption();
    }

    public long getTrainDamage() {
        return trainDamage;
    }

    public void setTrainDamage(long trainDamage) {
        if(this.trainDamage != trainDamage) {
            this.trainDamage = trainDamage;
            setUpdateOption();
        }
    }

    public long getNormalDamage() {
        return normalDamage;
    }

    public void setNormalDamage(long normalDamage) {
        if(this.normalDamage != normalDamage) {
            this.normalDamage = normalDamage;
            setUpdateOption();
        }
    }

    public GourdChildPassDetail getPassDetail() {
        return passDetail;
    }

    public void setPassDetail(GourdChildPassDetail passDetail) {
        this.passDetail = passDetail;
        setUpdateOption();
    }

    public int getTotalTimes() {
        return totalTimes;
    }

    public void setTotalTimes(int totalTimes) {
        if(this.totalTimes != totalTimes) {
            this.totalTimes = totalTimes;
            setUpdateOption();
        }
    }

    public List<Integer> getDrawBoxList() {
        return drawBoxList;
    }

    public void setDrawBoxList(List<Integer> drawBoxList) {
        this.drawBoxList = drawBoxList;
    }

    public boolean isGetSharedBox() {
        return getSharedBox;
    }

    public void setGetSharedBox(boolean getSharedBox) {
        if(this.getSharedBox != getSharedBox) {
            this.getSharedBox = getSharedBox;
            setUpdateOption();
        }
    }

    public int getCommonTimes() {
        return commonTimes;
    }

    public void setCommonTimes(int commonTimes) {
        if(this.commonTimes != commonTimes) {
            this.commonTimes = commonTimes;
            setUpdateOption();
        }
    }

    //缓存

    public List<Grid> getTempGridList() {
        return tempGridList;
    }

    public void setTempGridList(List<Grid> tempGridList) {
        this.tempGridList = tempGridList;
    }

    public Grid getTempNextGrid() {
        return tempNextGrid;
    }

    public void setTempNextGrid(Grid tempNextGrid) {
        this.tempNextGrid = tempNextGrid;
    }

    public GourdChildPassDetail getTempPassDetail() {
        return tempPassDetail;
    }

    public void setTempPassDetail(GourdChildPassDetail tempPassDetail) {
        this.tempPassDetail = tempPassDetail;
    }

    public long getLastDrawHideTime() {
        return lastDrawHideTime;
    }

    public void setLastDrawHideTime(long lastDrawHideTime) {
        this.lastDrawHideTime = lastDrawHideTime;
    }

    public int getHistoryPassId() {
        return historyPassId;
    }

    public void setHistoryPassId(int historyPassId) {
        if(this.historyPassId != historyPassId) {
            this.historyPassId = historyPassId;
            setUpdateOption();
        }
    }
}
